package me.chan.netty.rpc.msg;

import lombok.Data;

@Data
public class RpcRequestMessage extends Message {


    private String interfaceName;

    private String methodName;

    private Class[] parameterTypes;

    private Object[] parameterValues;

    private Class<?> returnType;

    // TODO remember to remove it
    public RpcRequestMessage() {}


    public RpcRequestMessage(int sequenceId, String interfaceName, String methodName, Class<?> returnType, Class[] parameterTypes, Object[] parameterValues) {
        super.setSequenceId(sequenceId);
        this.interfaceName = interfaceName;
        this.methodName = methodName;
        this.returnType = returnType;
        this.parameterTypes = parameterTypes;
        this.parameterValues = parameterValues;
    }

    @Override
    public int getMessageType() {
        return Message.RpcRequestMessage;
    }

}
